package com.qcby.dao;

import com.qcby.model.TicketOrder;
import com.qcby.model.dto.TicketOrderVo;
import com.qcby.query.TicketOrderQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface TicketOrderMapper extends BaseDao<TicketOrderQuery, TicketOrder> {
    Integer insertOrder(TicketOrder order);

    void updateByOrderNo(@Param("order") TicketOrder order, @Param("oid") Integer oid);

    List<TicketOrder> selectByOrderNo(@Param("orderNo") String orderNo);

    List<TicketOrderVo> selectCondition(@Param("uid") Integer uid, @Param("cId") Integer cId,
                                        @Param("hId") Integer hId, @Param("movieName") String movieName,
                                        @Param("seatList") List<String> seatList,
                                        @Param("beginDay") String beginDay, @Param("endDay") String endDay,
                                        @Param("startNum") Integer startNum, @Param("pageSize") Integer pageSize);

    Integer selectConditionCount(@Param("uid") Integer uid, @Param("cId") Integer cId,
                                 @Param("hId") Integer hId, @Param("movieName") String movieName,
                                 @Param("seatList") List<String> seatList,
                                 @Param("beginDay") String beginDay, @Param("endDay") String endDay);

    Integer selectByUidAndMid(@Param("uid") Integer uid, @Param("mid") Integer mid);
}
